package cn.le.route;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 项目名  spring-boot
 * Created by lansp
 * Created at 2018/6/1
 * 描述:
 */

@Component
@RabbitListener(queues = "msgA")
class RouteReceiverA {

	@RabbitHandler
	public void process(String msg){
		System.out.println("receiverA : " + msg);
	}
}

@Component
@RabbitListener(queues = "msgB")
class RouteReceiverAB{

	@RabbitHandler
	public void process(String msg){
		System.out.println("receiverB : " + msg);
	}
}
